This chapter discusses the creation and management of virtual file systems (VFSs). Before you create a VFS, you must first select a virtual server and a storage pool in which to locate the VFS.
Each VFS in a cluster must be labeled with a name that is used by management commands to refer to that particular VFS. Any assigned name can be chosen, provided that it is unique within a cluster. You need to give some thought to the names you choose so that when other VFSs are added to the cluster, the names are orderly and recognizable. For example, if you are deploying a software-development project on a SpinServer system, you might choose to create the following VFSs:
A VFS named user.user_name for each user
A VFS named src.component for source code for each component
A VFS named build.component for compiled images of each component
Uniform naming schemes make it easier to manage large numbers of VFSs.
The root virtual file system for a virtual server is automatically created and mounted when the virtual server is created. The VFS is named root.virtual_server, where virtual_server is the name or ID you have given the virtual server. It is mounted at / (root).
The file system for a particular virtual server is expanded by creating additional VFSs and linking them together by using the filestorage vfs mount command.
The basic unit of storage on a SpinServer is the VFS, which is a conceptual container for a set of logically related directories and files. Use the filestorage commands to create and manage VFSs.
You can perform the following operations on VFSs:
SpinShot—The SpinShot is SpinFS's snapshot implementation. A SpinShot of a VFS is a new VFS with read-only access. It is located on the same storage pool as the original VFS and represents the contents of the original VFS at a particular point in time. An original VFS and a SpinShot of it share disk space for all blocks that have not been modified between the creation of the VFS and the time the SpinShot is made, thereby making SpinShots lightweight. Similarly, two SpinShots share disk space for those blocks that were not modified between the times that the two SpinShots were created. A chain of SpinShots can be created to represent the state of a VFS at a number of points in time. SpinShots can be accessed online, enabling users to retrieve their own data from past copies, rather than asking a system administrator to restore data from tape. A SpinShot is automatically mounted. SpinShots provide the basis for other VFS management features, including copying, mirroring, and moving.
Move—You can move a VFS from one storage pool to another. The original VFS is completely copied to a new storage pool with the same name, and then the original VFS is deleted. This is useful for data management and load balancing. For instance, if one storage pool holds 500 VFSs with similar sizes and another storage pool of the same size holds only 200 VFSs of the same approximate sizes, you can move VFSs from the first storage pool to the second to balance the load and improve performance.
Copy—A VFS copy is a full copy of the original VFS with the same access (read-only or read-write) as the original VFS. It does not share blocks with the original VFS; thus, a copy of a 2-GB VFS uses 2 GB of disk space, unlike a SpinShot of a VFS, which might use only a few kilobytes of disk space because of shared blocks. After the copy is made, no operations made on the copy or on the original affect the other. For instance, if you write data to the original VFS, the data is not written to the copy. A VFS copy is not automatically mounted when it is created.
Mirror—A VFS mirror is a read-only copy of a VFS on the same or a different storage pool. If it is on the same storage pool as the original, it shares blocks with the original; if it is on a different storage pool, it does not share blocks with the original. It can be synchronized with the original VFS whenever the administrator desires. After it is created, a VFS mirror must be replicated with data from the original VFS before it is ready for use. A mirror is automatically mounted only if the entire VFS tree is mirrored, and each VFS is mounted with the context mount type.
Table 13-1 summarizes the differences among SpinShots, copies, mirrors, and moved VFSs.
Table 13-1. Differences among VFS Features
| Feature | Access type (read-write or read-only) | Auto-mounted? | Full copy or shared blocks? | Location |
|---|---|---|---|---|
| SpinShot | Read-only | Yes | Shared blocks | Same storage pool and SpinServer |
| Copy | Same as the original VFS (read-write or read-only) | No | Full copy | Same or different storage pool; same or different SpinServer |
| Mirror | Read-only | Yes (upon replication) | Full copy | Different storage pool; same or different SpinServer |
| Move | Same as the original VFS (read-write or read-only) | Yes | Full move, then deletion of original | Different storage pool; same or different SpinServer |
All of these VFS operations must occur within the context of the same virtual server. For instance, you cannot move a VFS from a virtual server named vs0 to a virtual server named vs1. However, a virtual server can span multiple SpinServers and multiple storage pools.
You can schedule regular occurrences of SpinShots and mirrors by using the VFS Scheduler. See Section 13.2.11 for information on using the VFS Scheduler.
VFS operations can take a long time to complete, depending on the size of the VFS and the load on the cluster. For instance, moving a 1-TB VFS might take several hours to complete. See Section 20.2.11 for information on managing long-running jobs.
To create a VFS, select a virtual server and a storage pool, set quotas, and mount the VFS. Additional management tasks include the following:
Unmounting a VFS
Removing a VFS from the system by deleting it
Modifying the VFS's quotas
Taking a one-time SpinShot of a VFS
Displaying configuration information for VFSs, their mount paths, and virtual servers
Copying a VFS
Mirroring a VFS
Moving a VFS
Resetting the export rule set for a VFS
Scheduling regular tasks (such as creating SpinShots and replicating mirrors) for a VFS
To manage virtual file systems, you must first define the purposes that the VFSs are to serve so that you can set the quotas for the amount of data that is stored in the VFS. After creating VFSs and setting the quotas, you mount the VFSs.
The purposes of the VFSs are defined by the needs of the organization. If the data contained in a VFS is crucial to the organization and not reproducible, it must be backed up on a clearly defined schedule so that it is easily recoverable in the event of a disaster. On the other hand, if the data in the VFS is a working file and easily reproduced, it does not need to be backed up. The size of the VFS is determined by the user's need for storage and working space.
After you define and create the VFSs, provide users with the definitions of their purpose and use so that the storage space is used appropriately and efficiently.
For example, a user can be assigned the following VFSs:
Home directory
Build directory
Source directory
The Home directory is typically small in size, about 10 MB, and contains configuration and initialization files. The Home VFS is scheduled for backup. The Build VFS is a working space is often large in size (10 GB) and used for binaries and compiled object files. It can easily be reproduced, so it is not scheduled for backup. The Source VFS usually is small in size, about 100 MB, and contains daily program files, such as documents or source code in progress. The Source VFS is scheduled for backup.
To create a VFS, use the filestorage vfs new command.
Minimum and maximum quotas can be specified when creating a VFS. A quota refers to an amount of data storage and is specified in units of 1-MB blocks.
The minimum quota guarantees that the specified amount of storage is available. This is done by reserving storage from the underlying storage pool. The maximum quota limits the amount of data that can be written to a VFS, but no reservation is made. Oversubscription is possible, and the quotas can be modified at any time.
You can set VFSs to issue an alert when they reach a predetermined threshold of remaining space. The alert is issued in the form of a critical event that can be relayed to administrators via an event subscription, an SNMP trap destination, or both. To set a free-space alarm on a new VFS, specify the -freespacealarm free_space_alarm_threshold parameter, where free_space_alarm_threshold indicates the percentage of free space remaining on the VFS or storage pool before the free-space alarm is triggered. For instance, setting a value of 5 triggers an alert when 5% of free space remains on the storage pool or VFS; that is, when the storage pool or VFS is 95% full. Possible values are integers from 1 to 50, or 0 to disable the free-space alarm.
When creating a VFS, you can specify the export rule set name that applies to it. Export rule sets enable you to restrict access to the VFS based on clients' IP addresses and authentication levels. See Chapter 16 for more information.
The number of VFSs that can be created within a given storage pool is limited by the underlying storage pool space.
A VFS name can be 1 to 32 characters long and can consist of letters, numerals, and the period and underscore characters. The name must start with a letter or numeral. You cannot use the same VFS name on multiple, different virtual servers. VFS names must be unique to a cluster.
The syntax of the filestorage vfs new command follows.
filestorage vfs new -vfsname VFS_name -vsname virtual_server_name -spdevid storage_pool_name -usertype user_type -domain domain_name -user user_name -group group_name -qmin quota_minimum -qmax quota_maximum -freespacealarm free_space_alarm_threshold -mounttype {context | explicit | mirror | spinshot} -mountpath mount_point -rulesetname rule_set_name -virusscanrw {true | false} -virusscanro {true | false} -showspinshot {true | false} -restrictedacl {true | false}
The following notes apply to the command:
The -mounttype parameter specifies the type of VFS that is to be created. Possible values include context for a VFS that assumes the context of its parent mount point (read-write or read-only), explicit for a VFS that is read-write regardless of its context (for instance, a read-write VFS mounted below a VFS mirror), mirror for a read-only mirror, and spinshot for a read-only SpinShot. The default is context.
The -usertype field has four options: SPIN, NFS, CIFS, and NFS-Kerberos. Use the SPIN value if an NIS or CIFS domain is not configured or available. If you create an NFS or CIFS virtual server or VFS, a NIS or a CIFS domain must already be configured on the SpinServer. The CIFS user type is used only for CIFS or mixed-security (NFS and CIFS) environments. If you specify the NFS-Kerberos user type, you must specify a Kerberos realm name as the value of the -domain parameter and a Kerberos principal name as the value of the -user parameter. If the NFS-Kerberos user type is specified, the value of the -group parameter is disregarded and can be omitted from the command.
If the NFS-Kerberos user type is specified, the ownership of the VFS is assigned to the user that is mapped to the Kerberos principal name specified by the value of the -user parameter. The virtual server must have a NIS domain or other mapping mechanism (for instance, a pluggable authentication module) associated with it, and a Kerberos-NIS mapping that matches the Kerberos principal name must exist.
To have the VFS inherit the export rule set of the VFS on which the new VFS is mounted, specify a value of inherit for the -rulesetname parameter. This is a reserved value that applies only to the filestorage vfs new command, and only when the new VFS is mounted at the same time it is created.
The -showspinshot parameter specifies whether the VFS's .spinshot directory is visible to clients. The default is true.
The -restrictedacl parameter specifies whether CIFS access control lists (ACLs) are used on files on the VFS. The default is false (that is, ACLs are used on the VFS). If ACLs are not used on the VFS, then the only permissions you can set on files are UNIX mode bits, and attempting to modify ACLs from a CIFS client results only in changes to the mode bits.
The following example creates a VFS named vfs1 for the virtual server vs1 on storage pool sp0 with a 5000-MB minimum quota and 10000-MB maximum quota. The user type is SPIN, the user name is 0, the domain name is 0, and the group is 0. A free-space alarm of 10% is specified. The mount type is set to context, and the mount path is set to /root. The export rule set is inherited from the VFS on which the new VFS is mounted (root). Virus scanning is enabled for read-write and read-only VFSs. The VFS's .spinshot directory is not visible to clients. CIFS ACLs are not used on files on the VFS.
spinserver::> filestorage vfs new -vsname vs1 -spdevid sp0 -vfsname vfs1 -usertype SPIN -domain 0 -user 0 -group 0 -qmin 5000 -qmax 10000 -freespacealarm 10 -mounttype context -mountpath /root -rulesetname inherit -virusscanrw true -virusscanro true -showspinshot false -restrictedacl true
The settings for a virtual file system can be modified at any time. Use the filestorage vfs modify command to modify the minimum and maximum quotas for a virtual file system that were specified when the VFS was created or that are in current use, to modify the free-space alarm threshold, to modify the export rule set that is applied to the VFS (see Chapter 16 for information about export rule sets), and to change the virus-scanning settings for the VFS. The command has the following syntax.
filestorage vfs modify -vfsname VFS_name [-usertype user_type] [-domain domain_name] [-user user_name] [-group group_name] [-qmin quota_minimum] [-qmax quota_maximum] [-freespacealarm free_space_alarm_threshold] [-rulesetname rule_set_name] [-virusscanrw {true | false}] [-virusscanro {true | false}] [-showspinshot {true | false}] [-restrictedacl {true | false}]
The following example sets a new maximum quota of 20000 MB for the VFS named vfs1.
spinserver::> filestorage vfs modify -vfsname vfs1 -qmax 20000
If you do not specify a mount path when you create a VFS, use the filestorage vfs mount command to mount the VFS. A VFS can be mounted in another VFS. The command has the following syntax:
filestorage vfs mount -vfsname VFS_name -mountpath mount_path -mounttype {context | explicit | mirror | spinshot} -expoverride {true | false}
The -mounttype parameter specifies the type of VFS that is to be mounted. Possible values include context for a VFS that assumes the context of its parent mount point (read-write or read-only), explicit for a VFS that is read-write regardless of its context (for instance, a read-write VFS mounted below a mirror VFS), mirror for a read-only mirror, and spinshot for a read-only SpinShot. The default is context.
The -expoverride parameter specifies whether the VFS's associated export rule set is overridden. (See Chapter 16 for information about export rule sets.) The default is false. The following rules apply to export rules when a VFS is mounted.
If the associated export rule set is none, the mounted VFS's associated rule set is changed to be the same as the VFS it is mounted on, unless the parent VFS's associated export rule set is also none.
If the mounted VFS has an associated export rule set, the rule set is not changed unless the value of the -expoverride parameter is set to true. If this value is set as true, the mounted VFS has its rule set changed to match the parent VFS's associated rule set, unless the parent VFS's associated export rule set is none.
Rule-set changes are not recursive. To change rule sets recursively down a chain of VFSs, use the filestorage vfs resetexportruleset command, as described in Section 13.2.10.
The following example sets a mount path of /Server1/engineering for the virtual file system named vfs1. The VFS is mounted in the same context (read-write or read-only) as the parent VFS on which it is mounted. The associated export rule set is not overridden.
spinserver::> filestorage vfs mount -vfsname vfs1 -mountpath /Server1/engineering -mounttype context -expoverride false
To point a virtual file system to a different directory path, you must unmount it from the current path. Use the filestorage vfs unmount command to unmount a VFS. The command has the following syntax:
filestorage vfs unmount -vfsname VFS_name
The following command unmounts the virtual file system named vfs1.
spinserver::> filestorage vfs unmount -vfsname vfs1
To display the mount path for a virtual file system, use the filestorage vfs show-mount command. This command can be used without the -vfsname parameter to display all VFS mount paths or with the -vfsname parameter to display the mount path for a specific VFS. The syntax of the command follows.
filestorage vfs show-mount [-vfsname VFS_name]
The following example displays the mount path for the virtual file system named vfs1.
spinserver::> filestorage vfs show-mount -vfsname vfs1
Use the filestorage vfs show command to display and review the configuration information for the virtual file systems. This command can be used without the -vfsname parameter to display information about all read-write VFSs in the system or with the parameter to display information about a specific VFS (read-write or read-only). The syntax of the command follows.
filestorage vfs show [-vfsname VFS_name]
The command displays the following information about the VFS or VFSs. Some fields are displayed only when you issue the command for a specific VFS.
VFS name
VFS family name
Number of VFSs in the family
Virtual server name
Storage pool name
VFS ID (specific VFS only)
Type (read-write or read-only) (specific VFS only)
Creation time (specific VFS only)
Virtual server from which the VFS was mounted
Mount type (context, explicit, mirror, or spinshot; specific VFS only)
Mount path
Minimum quota (in MB)
Maximum quota (in MB)
Free-space alarm threshold (percentage)
Amount of data storage in use (in MB)
Storage pool name
Amount of data storage that is available on the storage pool (in MB)
User type (specific VFS only)
Domain (specific VFS only)
User (specific VFS only)
Group (specific VFS only)
Whether virus scanning is enabled for read-write VFSs
Whether virus scanning is enabled for read-only VFSs
Whether the .spinshot directory is visible to clients
Status of the VFS (online or offline)
Last status error, if any
The following example displays information about a VFS named user.1.
spinserver::> filestorage vfs show -vfsname user.1 VFS user.1 Family Name user.1 Family Size 1 Virtual Server mike0 VFS ID 1026 Type read-write Create Time 11/10/2003 4:26 PM Mounted From root.mike0 Mount Type context Mount Path /user.1 Minimum Quota (MB) 0 Maximum Quota (MB) 1000 Free Space Alarm Threshold (%) 0 Used (MB) 1 Storage Pool pool1 SP Avail (MB) 32255 User Type of root FID SPIN Domain of root FID 0 User of root FID 0 Group of root FID 0 Export Ruleset Name default_ruleset VirusScan for R-W false VirusScan for R-O false Show Spinshot Directory false Status online Status Error
The filestorage vfs show-access, filestorage vfs show-mount, filestorage vfs show-virusscan, and filestorage vfs show-vs commands can be used to display subsets of VFS information pertaining to export rule sets, mount paths, virus scanning, and virtual servers, respectively. These commands display information about read-write VFSs only.
The filestorage vfs show command, when issued without the -vfsname parameter, displays information about only read-write VFSs. To display information about all VFSs, both read-only and read-write, use the filestorage vfs show-all command. The command has the following syntax:
filestorage vfs show-all
The following example displays information about both read-only and read-write VFSs:
spinserver::> filestorage vfs show-all
VFS Fam MaxQ (MB) Used (MB) Storage SP Avail (MB) Status
Siz Pool
root.vs0 1 10 1 pool0 47806 online
root.vs1 1 10 1 pool1 63883 online
vs0pool0_11 1 10 1 pool0 47806 online
vs0pool0_12 1 10 1 pool0 47806 online
vs0pool0_13 1 10 1 pool0 47806 online
vs0pool0_14 1 10 1 pool0 47806 online
vs0pool0_15 1 10 1 pool0 47806 online
vs0pool0_16 1 10 1 pool0 47806 online
vs0pool0_17 1 10 1 pool0 47806 online
vs0pool0_18 1 10 1 pool0 47806 online
vs0pool0_19 1 10 1 pool0 47806 online
vs0pool0_20 1 10 1 pool0 47806 online
vs0pool0_21 1 10 1 pool0 47806 online
vs0pool0_22 1 10 1 pool0 47806 online
vs0pool0_23 1 10 1 pool0 47806 online
The filestorage vfs show command, when issued without the -vfsname parameter, displays information about only read-write VFSs. To display information about read-only VFSs (for instance, SpinShots and mirrors) that are associated with a read-write VFS, use the filestorage vfs show-family command. The command has the following syntax:
filestorage vfs show-family -vfsname read_write_VFS_name
The following example displays information about the read-only VFSs associated with a read-write VFS named vfs1.
spinserver::> filestorage vfs show-family -vfsname vfs1
VFS Type Mount Path Create Time Storage Status
Pool
san.67 spinshot .spinshot/hourly 09/22/2004 8:58 AM pool0 online
san.77 spinshot .spinshot/hourly 09/22/2004 6:23 AM pool0 online
san.16 spinshot .spinshot/weekly 09/12/2004 12:44 AM pool0 online
san.m1 mirror /san 09/22/2004 9:30 AM pool1 online
san read-write /san 07/06/2004 1:32 PM pool0 online
san.23 spinshot .spinshot/hourly 09/22/2004 11:28 AM pool0 online
san.19 spinshot .spinshot/daily 09/22/2004 12:38 AM pool0 online
san.m3 mirror /san 09/22/2004 9:30 AM pool19 online
san.m0 mirror /san 09/22/2004 9:30 AM pool0 online
san.m5 mirror /san 09/22/2004 9:30 AM pool15 online
san.m4 mirror /san 09/22/2004 9:30 AM pool14 online
san.36 spinshot .spinshot/daily 09/15/2004 12:37 AM pool0 online
san.m2 mirror /san 09/22/2004 9:31 AM pool99 online
To display detailed information about a specific VFS, whether read-write or read-only, issue the filestorage vfs show command with the -vfsname parameter.
The filestorage backup show command displays the following information about backup operations for one or more VFSs:
VFS name
VFS ID
Storage pool ID
Time of last full backup
Time of last backup (levels 0 through 9)
Version number of backups 0 through 9
Creation time of backups 0 through 9
Error status, if any
The command has the following syntax:
filestorage backup show [-vfsname VFS_name]
To remove a virtual file system from a system, use the filestorage vfs delete command. The command has the following syntax:
filestorage vfs delete -vfsname VFS_name
The following example deletes the virtual file system named vfs1.
spinserver::> filestorage vfs delete -vfsname vfs1
You can create a one-time SpinShot of a virtual file system by using the filestorage vfs spinshot command. The SpinShot is named by the SpinServer. The SpinServer gives the SpinShot the original VFS name and appends a new VFS ID to the name. This combination of original VFS name and the new VFS ID becomes the SpinShot's name. The SpinShot is mounted at a location specified by the value of the -mountpointname parameter; the SpinShot is then mounted under the source SpinShot at vfs/.spinshot/spinshot_name. For instance, if you create a SpinShot of a VFS named foo and specify a mount point of bar, the SpinShot is mounted at foo/.spinshot/bar. The syntax of the command follows.
filestorage vfs spinshot -src source_VFS_name -mountpointname mount_point_name
The following example creates a one-time SpinShot of the virtual file system vfs1 and gives it the mount point myTuesData, so that the SpinShot is mounted at vfs1/.spinshot/myTuesData.
spinserver::> filestorage vfs spinshot -src vfs1 -mountpointname myTuesData
A VFS copy is a complete version of the original VFS with the same access (read-write or read-only) as the original. It can be on the same server or a different server, and in the same storage pool or on a different storage pool. It contains a complete copy of all data from the original VFS; it does not share blocks with the original VFS. For example, a copy of a 2-GB VFS uses 2 GB of disk space, whereas a SpinShot of the same VFS might use only a few kilobytes of disk space, depending on the extent of changes that have been made to the original since it was created. After you create a copy, mount it by using the filestorage vfs mount command.
Use the filestorage vfs copy command to copy a VFS. The syntax of the command follows.
filestorage vfs copy -vfsname VFS_name -copyvfsname name_of_VFS_copy -copyspname storage_pool_name
The following example makes a copy of a VFS named dev.testdata. The copy is named dev.copydata and is located on a storage pool named sp0.
spinserver::> filestorage vfs copy -vfsname dev.testdata -copyvfsname dev.copydata -copyspname sp0
You can move a VFS from one storage pool to another. This is useful for load balancing; for instance, if one storage pool has only 10 GB of free space and another storage pool of equal capacity has 200 GB of free space, you can move several VFSs from the first storage pool to the second pool so that the storage requirements are more equally balanced.
If a read-write VFS that has associated SpinShots or mirrors is moved, the SpinShots and mirrors remain in their original locations. It is recommended that you move or delete any SpinShots or mirrors that are associated with the parent read-write VFS to avoid potential confusion and to ensure efficient use of storage.
Use the filestorage vfs move command to move a VFS. The syntax of the command follows.
filestorage vfs move -vfsname VFS_name -spname storage_pool_name
The following example moves a VFS named user.fred to a storage pool named sp3.
spinserver::> filestorage vfs move -vfsname user.fred -spname sp3
A mirror of a VFS is a read-only VFS that contains a full copy of the data from the original (that is, it does not share blocks with the original). Data from the original must be replicated to the mirror; this can be performed manually or scheduled by using the VFS Scheduler. Mirrors can be used for backup and for disaster recovery.
Use the filestorage mirror commands to work with VFS mirrors.
Note: The filestorage mirror commands require the SpinMirror software package, which is licensed separately from the base SpinFS software package.
Use the filestorage mirror new command to create a VFS mirror. The syntax of the command follows.
filestorage mirror new -sourcevfsname source_VFS_name -sinkvfsname sink_VFS_name -sinkspname storage_pool_name
The following example creates a mirror of a VFS named user.john. The mirror is named mirror.john and is located on a storage pool named pool1.
spinserver::> filestorage mirror new -sourcevfsname user.john -sinkvfsname mirror.john -sinkspname pool1
After a VFS mirror is created, it needs to be replicated with data from the original VFS. Additional replications need to occur periodically to keep the mirror current. When a mirror is replicated, only the data that has changed is pushed to the mirror. Use the filestorage mirror replicate command to replicate the data in a VFS to a mirror VFS and to specify the number of mirror replicas that are kept. After the specified number is reached, the oldest replica is deleted as each new replica is created. The syntax of the command follows.
filestorage mirror replicate -sourcevfsname source_VFS_name -sinkvfsname sink_VFS_name -maxspinshots number_of_replicas
The following example replicates the data on a VFS named user.john to a mirror named mirror.john. The command keeps 3 replicas.
spinserver::> filestorage mirror replicate -sourcevfsname user.john -sinkvfsname mirror.john -maxspinshots 3
To avoid having to use this command to replicate VFSs to their mirrors manually, use the VFS Scheduler to schedule regular replications of VFSs. See Section 13.2.11 for more information.
Use the filestorage mirror show command to display information about all VFS mirrors or about a specific VFS mirror. The syntax of the command follows.
filestorage mirror show [-sourcevfsname source_VFS_name -sinkvfsname sink_VFS_name]
The following example displays mirror information about a VFS named user.john and its mirror, which is named mirror.john.
spinserver::> filestorage mirror show -sourcevfsname vfs1 -sinkvfsname m.vfs1 Source VFS Sink VFS Source SP Sink SP Sink Vers Status vfs1 m.vfs1 pool0 pool1 1 online
You can display information about the mirrors associated with a particular source VFS by using the filestorage mirror show-group command. Issue the command with the name of the source VFS and one of its mirrors; the command then displays information about the source VFS and all of its mirrors. Use this command if you need to locate all mirrors associated with a particular VFS. The command has the following syntax:
filestorage mirror show-group -sourcevfsname source_VFS_name -sinkvfsname sink_VFS_name
The following example displays information about the mirrors of a source VFS named san, with one mirror named san.m1:
spinserver::> filestorage mirror show-group -sourcevfsname san -sinkvfsname san.m1 Source VFS Sink VFS Source SP Sink SP Sink Ver Status san san.m1 pool0 pool1 2550018 online san san.m3 pool0 pool19 2550018 online san san.m0 pool0 pool0 2550018 online san san.m5 pool0 pool15 2550018 online san san.m4 pool0 pool14 2550018 online san san.m2 pool0 pool99 2550018 online
To delete VFS mirrors, use the filestorage mirror delete command. This command deletes the specified VFS mirror of a source VFS. When this command is run, the original VFS remains intact, but the specified mirror is deleted.
| Caution: |
|
If you have a VFS that is mirrored to two storage pools and you want to delete one of the mirrors, ensure that all mirrors are replicated immediately before deleting any mirrors, or otherwise ensure that all mirrors are synchronized with the source VFS before deleting any mirrors. This prevents clients from receiving potentially out-of-date date from an obsolete mirror. |
The syntax of the command follows.
filestorage mirror delete -sourcevfsname source_VFS_name -sinkvfsname sink_VFS_name
The following example deletes a VFS mirror named mirror.john, which is a mirror of a VFS named user.john.
spinserver::> filestorage mirror delete -sourcevfsname user.john -sinkvfsname mirror.john
Export rule sets enable you to restrict access to a VFS based on clients' IP addresses and levels of authentication. See Chapter 16 for information on setting up export rule sets. To reset the export rule set on a single VFS, it is most efficient to use the filestorage vfs modify command with the -rulesetname parameter. To reset the export rule set for one or more VFSs, use the filestorage vfs resetexportruleset command. The command can propagate changes to export rule sets recursively down a chain of VFSs. The export rule set is changed on the VFS specified by the value of the -vfsname parameter; it can also be changed on all VFSs mounted below that VFS.
The -rulesetname and -expoverride parameters specify how to handle export rule sets on subordinate VFSs that are not using the export rule set named none. Subordinate VFSs are VFSs that are mounted below the VFS specified by the value of the -vfsname parameter. Each subordinate VFS is evaluated and changed as follows:
If the rule set specified by the value of the -rulesetname parameter is none, then the rule set on each subordinate VFS is set to none, thereby clearing the rule sets on the target VFS and all subordinate VFSs.
If the rule set of a subordinate VFS is currently set to none, then the rule set of the subordinate VFS is changed to the rule set specified by the value of the -rulesetname parameter.
If the rule set of a subordinate VFS is currently set to a value other than none, then the ruleset of the subordinate VFS is changed only if the value of the -expoverride parameter is true. (The default is false.)
The command has the following syntax:
filestorage vfs resetexportruleset -vfsname VFS_name -rulesetname rule_set_name -expoverride {true | false}
The following example resets the rule set for a virtual file system named vfs1 to a rule set named newRS. The new rule set is applied to all VFSs mounted below vfs1 regardless of their current rule sets.
spinserver::> filestorage vfs resetexportruleset -vfsname vfs1 -rulesetname newRS -expoverride true
The VFS Scheduler enables you to schedule VFS operations including SpinShots and mirrors. In VFS Scheduler terminology, a job is a task (such as replicating a mirror or creating a SpinShot) that runs on a specific schedule. Use the filestorage scheduler commands to create and modify VFS Scheduler tasks, schedules, and jobs.
Use the filestorage scheduler tasks new command to create a new task. A task consists of a task name, the type of task (mirror or spinshot), the name of the VFS on which the task is to occur, and the number of task iterations that you want to be retained (that is, the number of mirror replicas or the number of SpinShots). The syntax of the command follows.
filestorage scheduler tasks new -name task_name -type VFS_type -vfs source_VFS_name -limit limitation
You can specify a pattern as the value of VFS_name. For instance, to specify all VFSs that begin with the characters dept., use a value of dept.*. You can specify VFSs that are not to be included by using the NOT{expression} syntax. For instance, to specify all VFSs named dept.* except for the VFS named dept.eng, use the following syntax:
dept.*, NOT{dept.eng}
You can combine multiple expressions. In the following example, VFSs named user.* and dept.* are included, but VFSs named user.z* and dept.acctg are excluded.
user*., dept.*, NOT{user.z*}, NOT{dept.acctg}
The following example creates a new mirror task called mirrorUserVFSs that mirrors all VFSs that match the pattern user*. A limit of 6 replicas is set.
spinserver::> filestorage scheduler tasks new -name mirrorUserVFSs -type mirror -vfs user* -limit 6
Use the filestorage scheduler tasks show command to display information about one or more tasks. The syntax of the command follows.
filestorage scheduler tasks show [-name task_name]
The following example displays information about all tasks known to the VFS Scheduler.
spinserver::> filestorage scheduler tasks show Name Type VFS Limitation mirrorAdmin mirror Admin 1 ssAdmin spinshot Admin 31 mirrorUserVFSs mirror user* 6
Use the filestorage scheduler tasks modify command to modify a task. The syntax of the command follows.
filestorage scheduler tasks modify -name task_name -type VFS_type -vfs source_VFS_name -limit limitation
The following example modifies a mirror task called mirrorUserVFSs so that it mirrors all VFSs that match the pattern usr.*. A limit of 3 replicas is set.
spinserver::> filestorage scheduler tasks modify -name mirrorUserVFSs -type mirror -vfs usr.* -limit 3
Use the filestorage scheduler tasks delete command to delete a task. The syntax of the command follows.
filestorage scheduler tasks delete -name task_name
The following example deletes a task called mirrorUserVFSs.
spinserver::> filestorage scheduler tasks delete -name mirrorUserVFSs
The filestorage scheduler tasks cleanup command deletes all SpinShots or mirror replicas created by a VFS Scheduler task. If the task is a SpinShot task, the command deletes all SpinShots that were created by the task. If the task is a mirror task, the command deletes all replicas that were created by the task. The command has the following syntax:
filestorage scheduler tasks cleanup -name task_name
The following example cleans up all mirror replicas associated with a mirror task named mirrorUserVFSs:
spinserver::> filestorage scheduler tasks cleanup -name mirrorUserVFSs
After you have created tasks, you need to create schedules on which the tasks run. Use the filestorage scheduler schedules new command to create a schedule. The command requires the name of the new schedule and the time at which the schedule is to run. The syntax of the command follows.
filestorage scheduler schedules new -name schedule_name -minutes minutes -hours hours -months months -dom days_of_month -dow days_of_week
Each schedule is assigned one of the following time types: minutely, hourly, daily, weekly, monthly, or yearly. The type is automatically determined, and is displayed in the output of the filestorage scheduler schedules show command.
Each time parameter can be specified as a range by using the following expressions:
As a single value. For instance, specify a value of -dow Tuesday for a schedule that is to run every Tuesday.
As a comma-separated list of values. For instance, specify a value of -hours 5,9,15 for a schedule that is to run at 5:00 a.m., 9:00 a.m., and 3:00 p.m.
As a slash-delimited interval. For instance, specify a value of -minutes /15 for a schedule that is to run every 15 minutes.
As a dash-delimited range. For instance, specify a value of -dom 20-31 for a schedule that is to run every day from the 20th of the month through the 31st of the month.
As an asterisk (*) to specify all possible values. For instance, specify a value of -months * for a schedule that is to run in all months.
Note: These expressions can be used only in the CLI. To specify a time range or interval in the GUI, select the appropriate values from the drop-down boxes.
Table 13-2. VFS Scheduler Format Examples>
| Time specifier | Single value | Example of comma-separated list | Example of slash-delimited interval | Example of dash-delimited range |
|---|---|---|---|---|
| Minutes | 0 through 59 | 0, 30, 45 | /20 | 0-10 |
| Hours | 0 through 23 | 0, 6, 18 | /2 | 0-6 |
| Months | January through December | January, May, September | /3 | June-August |
| Days of the month | 1 through 31 | 1, 10, 25 | /5 | 5-10 |
| Days of the week | Sunday through Saturday | Monday, Wednesday, Friday | /3 | Monday-Friday |
The following example creates a new schedule called noonOnWeekdays that runs every weekday (Monday through Friday) at 12:00 noon.
spinserver::> filestorage scheduler schedules new -name noonOnWeekdays -minutes 0 -hours 12 -months * -dom * -dow Monday-Friday
Note: Scheduled SpinShots are named and mounted according to their scheduling interval; for instance, hourly SpinShots are mounted under the ./.spinshot/hourly.n directory, where n is an integer that increases as the number of SpinShots grows. The most recent hourly SpinShot is located in the hourly.0 directory, the next most recent in the hourly.1 directory, and so on. SpinShots must be scheduled according to a scheme that matches the naming convention. For instance, you cannot schedule hourly SpinShots of the same VFS to occur on both the hour and the half-hour, as this breaks the naming convention. Because a task and a schedule are separate until they are bound together into a job, the SpinManager software does not enforce this limitation when tasks and schedules are set up.
This limitation does not apply to scheduled mirrors.
Note: For any given VFS or set of VFSs, you cannot have two VFS Scheduler SpinShot jobs of the same time type (that is, minutes, hours, month, days of month, or days of week) whose tasks overlap each other. For instance, you cannot schedule two SpinShot jobs that each run at 15 minutes past the hour on all VFSs named usr.*.
Use the filestorage scheduler schedules show command to display information about one or more schedules. The command has the following syntax:
filestorage scheduler schedules show [-name schedule_name]
The following example displays information about all schedules:
spinserver::> filestorage scheduler schedules show
Name Minutes Hours Months DaysOfMont DaysOfWeek
daily 0 0 * * *
hourly 35 * * * *
monthly 0 0 * 1 *
weekly 0 0 * * Sunday
yearly 0 0 January 1 *
noonOnWeekdays 0 12 * * Monday-Friday
Use the filestorage scheduler schedules modify command to modify a schedule. The command has the following syntax:
filestorage scheduler schedules modify -name schedule_name [-minutes minutes] [-hours hours] [-months months] [-dom days_of_month] [-dow days_of_week]
The following example modifies a schedule named 15thDay so that it runs on the fifteenth day of each month at 5:00 p.m.:
spinserver::> filestorage scheduler schedules modify -name 15thDay -minutes 0 -hours 17 -dom 15
Use the filestorage scheduler schedules delete command to delete a schedule. The command has the following syntax:
filestorage scheduler schedules delete -name schedule_name
The following example deletes a schedule named every5days:
spinserver::> filestorage scheduler schedules delete -name every5days
To create a job, you bind a task to a schedule. The task then runs on the schedule. To create a job, use the filestorage scheduler jobs new command. The command has the following syntax:
filestorage scheduler jobs new -task task_name -schedule schedule_name -autorun {true | false}
The following example creates and enables a new job by binding the task named mirrorUsers to the schedule named atNoon:
spinserver::> filestorage scheduler jobs new -task mirrorUsers -schedule atNoon -autorun true
To modify a job, use the filestorage scheduler jobs modify command. The command has the following syntax:
filestorage scheduler jobs modify -task task_name -schedule schedule_name -autorun {true | false}
The following example stops the automatic running (that is, disables) the job that consists of the task named mirrorUsers bound to the schedule named atNoon:
spinserver::> filestorage scheduler jobs modify -task mirrorUsers -schedule atNoon -autorun false
Use the filestorage scheduler jobs show command to display the following information about one or more jobs:
Task name
Schedule name
Whether the job automatically runs
Time of next execution (specific job only)
Time of last execution
Host of last execution (specific job only)
Status of last execution
The command has the following syntax:
filestorage scheduler jobs show [-task task_name -schedule schedule_name]
To display information about all jobs, issue the command without the -task and -schedule parameters. To display information about a specific job, specify the parameters.
The following example displays information about all jobs:
spinserver::> filestorage scheduler jobs show Task Schedule Autorun? Last Execution Status all_1 weekly true 7/6/03 12:00 AM Completed Successfully all_2 daily true 7/11/03 12:00 AM Completed Successfully all_3 hourly true 7/11/03 3:00 PM Completed Successfully
Use the filestorage scheduler jobs test command to run a test of a VFS Scheduler job immediately, without having to wait for the next scheduled time interval. The command has the following syntax:
filestorage scheduler jobs test -task task_name -schedule schedule_name
The following example runs a test of a task named mirrorUsers bound to the schedule named atNoon:
spinserver::> filestorage scheduler jobs test -task mirrorUsers -schedule atNoon
Use the filestorage scheduler jobs cleanup command to remove obsolete SpinShots and mirror replicas associated with a specified VFS Scheduler job. The command has the following syntax:
filestorage scheduler jobs cleanup -task task_name -schedule schedule_name
The following example cleans up all SpinShots or mirror replicas associated with a job that includes a task named spinshotUsers and a schedule named halfHour:
spinserver::> filestorage scheduler jobs cleanup -task spinshotUsers -schedule halfHour
Use the filestorage scheduler jobs delete command to delete a job. The command has the following syntax:
filestorage scheduler jobs delete -task task_name -schedule schedule_name
The following example deletes a job that includes a task named mirrorUsers and a schedule named atNoon:
spinserver::> filestorage scheduler jobs delete -task mirrorUsers -schedule atNoon
Copyright © 2004 Network Appliance, Inc.; copyright © 2003, 2004 Spinnaker Networks, LLC. All rights reserved. Specifications subject to change without notice.